package com.ntschy.sys.entity.dto.dicttype;

import com.ntschy.common.core.entity.enums.SysWhetherEnum;
import com.ntschy.sys.entity.valid.SysDictTypeGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * @author ezreal_geng
 */
@Data
@ApiModel(description = "数据字典类型新增更新dto")
public class SysDictTypeAddUpdateDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据字典类型ID")
    @NotBlank(message = "数据字典ID不能为空", groups = {SysDictTypeGroups.Update.class})
    @Length(min = 36, max = 36, message = "数据字典类型ID不合法", groups = {SysDictTypeGroups.Update.class})
    private String dictId;

    @ApiModelProperty(value = "数据字典名称")
    @NotBlank(message = "数据字典名称不能为空", groups = {SysDictTypeGroups.Add.class, SysDictTypeGroups.Update.class})
    @Length(max = 25, message = "数据字典名称长度不能超过25个字符", groups = {SysDictTypeGroups.Add.class, SysDictTypeGroups.Update.class})
    private String dictName;

    @ApiModelProperty(value = "数据字典类型")
    @NotBlank(message = "数据字典类型不能为空", groups = {SysDictTypeGroups.Add.class, SysDictTypeGroups.Update.class})
    @Length(max = 25, message = "数据字典类型长度不能超过25个字符", groups = {SysDictTypeGroups.Add.class, SysDictTypeGroups.Update.class})
    private String dictType;

    @ApiModelProperty(value = "数据字典是否系统内置 0-否 1-是")
    private SysWhetherEnum isSystem;

    @ApiModelProperty(value = "备注")
    private String remark;
}
